package net.wanho.shop.service.impl;

import lombok.RequiredArgsConstructor;
import net.wanho.shop.entity.Cate;
import net.wanho.shop.mapper.CateMapper;
import net.wanho.shop.service.CateService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Author：汤小洋
 * Date：2025-09-24 9:11
 * Description：<描述>
 */
@Service
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
@RequiredArgsConstructor
public class CateServiceImpl implements CateService {

    private final CateMapper cateMapper;

    @Override
    public List<Cate> list() {
        return cateMapper.selectAll();
    }
}
